import { handleActions } from 'redux-actions'
import { success } from '../ui-components'

const init = {
  list: null,
	template: {}
}

export default handleActions({
  'fetch onboarding templates': (state, { payload }) => ({
    ...state,
    list: payload.onboardingTemplateVOs,
		fetchId: Symbol('fetch')
  }),

	'reset onboarding templates': (state, { payload }) => ({
		...state,
		...init
	}),
	'fetch onboarding template': (state, { payload }) => ({
		...state,
		template: payload
	})
}, init)
